home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ MS Intellipoint 2.xpl < prev    next >
Text File  |  2004-01-14  |  3KB  |  122 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="6"
  3. "COUNT"="5"
  4. "UIPATH"="Hardware\Mouse\MS Intellipoint"
  5. "NAME"="Show/Hide Control Panel pages"
  6. "LANGUAGE"="VBScript"
  7. "TEXT 1"="Show "Activities" page"
  8. "TEXT 2"="Show "Buttons" page"
  9. "TEXT 3"="Show "IntelliPoint Wheel" page"
  10. "TEXT 4"="Show "Pointer Options" page"
  11. "TEXT 5"="Show "Wireless" page"
  12. "DESCRIPTION 1"="When you install Microsoft's IntelliPoint, your Mouse Properties applet in Control Panel acquires 4 new pages. If you want, you can disable these."
  13. "DESCRIPTION 2"="Note: Disabling all pages will revert the Mouse Properties dialog back to its 3 default pages."
  14. "COMMENT 1"="Thanks to CptSiskoX for suggesting that I download the IntelliPoint drivers, despite the fact I use a Logitech mouse. Ah well, it works..."
  15. "COMMENT 2"="Thanks to tbcat for the IntelliPoint 5.0 notice!"
  16. "VERSION"="2.01"
  17. "AUTHOR"="Xteq Systems"
  18. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved."
  19. "CONTACTURL"="http://www.xteq.com/"
  20.  
  21. sP="HKLM\Software\Microsoft\Windows\CurrentVersion\Controls Folder\Mouse\shellex\PropertySheetHandlers\"
  22. sP1=sP & "Activities\"
  23. sP2=sP & "Buttons\"
  24. sP3=sP & "Wheel\"
  25. sP4=sP & "PointerOptions\"
  26. sP5=sP & "Wireless\"
  27.  
  28. SUB Plugin_Initialize
  29.  s=RegReadValue(sP1 & "@")
  30.  IF len(s)>0 then 
  31.    Call SetUIElement(1,true)
  32.  end if
  33.  
  34.  s=RegReadValue(sP2 & "@")
  35.  IF len(s)>0 then 
  36.    Call SetUIElement(2,true)
  37.  end if
  38.  
  39.  s=RegReadValue(sP3 & "@")
  40.  IF len(s)>0 then 
  41.    Call SetUIElement(3,true)
  42.  end if
  43.  
  44.  s=RegReadValue(sP4 & "@")
  45.  IF len(s)>0 then 
  46.    Call SetUIElement(4,true)
  47.  end if
  48.  
  49.  s=RegReadValue(sP5 & "@")
  50.  IF len(s)>0 then 
  51.    Call SetUIElement(5,true)
  52.  end if
  53.  
  54. END SUB
  55.  
  56. SUB Plugin_CheckData(ElementIndex)
  57. END SUB
  58.  
  59. Sub WriteValue(RegPath,RegValue,MakeItVisible)
  60.  sBackupValName="XSP Backup"
  61.  
  62.  'first check if the path exists. If not, exit!
  63.  If RegPathExists(RegPath)=false then
  64.     ''Call msgInformation("Skiped following reg path: " & RegPath)
  65.     exit sub
  66.  end if
  67.  
  68.  s=RegReadValue(RegPath & RegValue)
  69.  if len(s)=0 then
  70.     'not visible at the moment
  71.     if MakeItVisible=false then
  72.        'do nothing...
  73.     else
  74.        sBakVal=RegReadValue(RegPath & sBackupValName)
  75.        if len(sBakVal)=0 then
  76.           Call MsgError("Unable to retrieve backup value from registry, unable to restore original value. I'm sorry, you need to reinstall MS IntelliPoint")
  77.        else
  78.           Call RegWriteValue(RegPath & RegValue,sBakVal,1)
  79.        end if
  80.  
  81.        if RegValueExists(RegPath & sBackupValName) then 
  82.           Call RegDeleteValue(RegPath & sBackupValName)
  83.        end if
  84.     end if
  85.  else
  86.     'sheet is visible at the moment
  87.     if MakeItVisible=true then
  88.        'do nothing
  89.     else
  90.        if RegValueExists(RegPath & sBackupValName)=false then 
  91.           sBakVal=RegReadValue(RegPath & RegValue)
  92.           Call RegWriteValue(RegPath & sBackupValName,sBakVal,1)
  93.        end if
  94.  
  95.        Call RegWriteValue(RegPath & RegValue,"",1)       
  96.     end if
  97.  end if
  98.  
  99. End Sub
  100.  
  101.  
  102. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  103.  b=GetUIElement(1)
  104.  Call WriteValue(sP1,"@",b)
  105.  
  106.  b=GetUIElement(2)
  107.  Call WriteValue(sP2,"@",b)
  108.  
  109.  b=GetUIElement(3)
  110.  Call WriteValue(sP3,"@",b)
  111.  
  112.  b=GetUIElement(4)
  113.  Call WriteValue(sP4,"@",b)
  114.  
  115.  b=GetUIElement(5)
  116.  Call WriteValue(sP5,"@",b)
  117.  
  118. END SUB
  119.  
  120. SUB Plugin_Terminate
  121. END SUB
  122.